;;==========================================================================
;; Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
;;==========================================================================

    AREA |.text|,ALIGN=2,CODE, READONLY

    EXPORT  save_flags_cli
    EXPORT  restore_flags
//==========================================================================
//disable fiq and irq, return r0 include the cpsr content

save_flags_cli
    mrs     r0, cpsr    //return current flags for restore later
    orr     r12, r0, #0xC0  //cli
    msr     cpsr_cf, r12
    mov     pc, lr

//==========================================================================
// r0 include the cpsr content

restore_flags
    msr     cpsr_cf, r0
    mov     pc, lr

    END
    